{extend name='admin@main'}

{block name="button"}
<button data-modal='{:url("add")}' data-title="添加" class='layui-btn layui-btn-sm layui-btn-primary'>添加</button>
{/block}

{block name="content"}
<div class="think-box-shadow">
    {include file='sms_code/index_search'}
    <table class="layui-table margin-top-10" lay-skin="line">
        {notempty name='list'}
        <thead>
        <tr>
            <th class="text-left">手机号</th>
            <th class="text-left">信息内容</th>
            <th class="text-left">验证码</th>
            <th class="text-left">IP</th>
            <th class="text-left">发送时间</th>
            <th class="text-left"></th>
        </tr>
        </thead>
        {/notempty}
        <tbody>
        {foreach $list as $key=>$vo}
        <tr>
            <td class='text-left nowrap'>
                {$vo.phone|default=''}
            </td>
            <td class='text-left nowrap'>
                {$vo.msg|default=''}
            </td>
            <td class='text-left nowrap'>
                {$vo.code|default=''}
            </td>
            <td class='text-left nowrap'>
                {$vo.ip|default=''}
            </td>
            <td class='text-left nowrap'>
                {$vo.time|default=''}
            </td>
            <td class='text-left nowrap'>
                {if auth("admin/sms_code/remove")}
                    <a class="layui-btn layui-btn-sm layui-btn-danger" data-confirm="确定要删除数据吗?" data-action="{:url('remove')}" data-value="id#{$vo.id}" data-csrf="{:systoken('remove')}">删 除</a>
                {else}
                    <a data-tips-text="您没有删除的权限哦！" class="layui-btn layui-btn-sm layui-btn-primary layui-disabled">删 除</a>
                {/if}
            </td>
        </tr>
        {/foreach}
        </tbody>
    </table>
    {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
</div>
{/block}
